<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 假设一个存储整数的二维数组 [[21, 32, 53, 31, 35, 43, 66],[42, 32, 53, 52, 86, 51, 66]] 去掉重复的数。比如有两个 66 只保留一个 66 -->
    <script>
      let arr = [
        [21, 32, 53, 31, 35, 43, 66],
        [42, 32, 53, 52, 86, 51, 66]
      ]
      //将二维数组转化为一维数组
      let arr1 = arr.flat()
      //给数组去重
      let newArr = [...new Set(arr1)]
      console.log(newArr)
    </script>
  </body>
</html>
